1 using UnityEngine;
2 using
UnityEngine.UI;
3 using
System;
4
5 public
class TimeRemainingDisplay : MonoBehaviour {
6     Text text;
7     LevelManager levelManager;
8
9     
// Use this for initialization
10     
void Start () {
11         text = GetComponent<Text>();
12         levelManager = FindObjectOfType<LevelManager>();
13     }
14     
15     
// Update is called once per frame
16     
void Update () {
17         text.text =
"Time Remaining: " + Convert.ToInt32(levelManager.timeTillNextLevel);
18     }
19 }


Gõ tìm kiếm nhanh...